package com.example.demonet;

import android.os.Bundle;

import com.example.demonet.api.APIManager;
import com.example.demonet.app.App;
import com.sgb.net.callback.ICallBack;
import com.sgb.net.entity.BaseEntity;
import com.sgb.net.util.MToast;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.btn).setOnClickListener(v -> APIManager.getInstance().getMaterialAPI().getProcess().enqueue(new ICallBack<BaseEntity>(true, true) {
            @Override
            public void onSuccess(BaseEntity data) {
                MToast.showToast(App.getApp(), "hello");
            }
        }));
    }
}